{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 14008 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{if $opc}
	{assign var="back_order_page" value="order-opc.php"}
{else}
	{assign var="back_order_page" value="order.php"}
{/if}
{if !$opc}
	<script type="text/javascript">
	// <![CDATA[
	var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
	var currencyRate = '{$currencyRate|floatval}';
	var currencyFormat = '{$currencyFormat|intval}';
	var currencyBlank = '{$currencyBlank|intval}';
	var txtProduct = "{l s='product'}";
	var txtProducts = "{l s='products'}";
	// ]]>
	</script>

	{capture name=path}{l s='Your payment method'}{/capture}
	{include file="$tpl_dir./breadcrumb.tpl"}
{/if}

{if !$opc}<h1>{l s='Choose your payment method'}</h1>{else}<h2>3. {l s='Choose your payment method'}</h2>{/if}

{if !$opc}
	{assign var='current_step' value='payment'}
	{include file="$tpl_dir./order-steps.tpl"}

	{include file="$tpl_dir./errors.tpl"}
{else}


	<div id="opc_payment_methods" class="opc-main-block">
		<div id="opc_payment_methods-overlay" class="opc-overlay" style="display: none;"></div>
{/if}
<form  action="{$link->getPageLink($back_order_page, true)}" method="post">
<div id="HOOK_TOP_PAYMENT">{$HOOK_TOP_PAYMENT}</div>
{if $HOOK_PAYMENT}
	{if !$opc}<h4>{l s='Please select your preferred payment method to pay the amount of'}&nbsp;<span class="price">{convertPrice price=$total_price}</span> {if $taxes_enabled}{l s='(tax incl.)'}{/if}</h4><br />{/if}
	{if $opc}<div id="opc_payment_methods-content">{/if}
		<div id="HOOK_PAYMENT">
	

				<h1>THANH TOÁN</h1>
				<div class="title_1">
					<span>VUI LÒNG CHỌN PHƯƠNG THỨC THANH TOÁN BẠN MONG MUỐN</span>
				</div>
				<!-- PANEL -->
				<div class="panel_checkout_wapper">
					<div class="panel_checkout_title">
						<span><input type="radio" name="choose_payment" value="1" checked>Thanh toán khi nhận hàng (COD)</span>
					</div>
					<div class="panel_checkout_content">
						<table>
							<tbody>
								<tr>
									<td class="left_table">Ghi chú cho nhân viên giao hàng 
										<small>(Không bắt buộc)</small></td>
									<td class="right_table"><input type="text" name="message_update" value="" placeholder="VD : Gặp chị Hoa nhận tiền"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!-- END PANEL -->

				<!-- PANEL -->
				<div class="panel_checkout_wapper">
					<div class="panel_checkout_title">
						<span><input type="radio" name="choose_payment" value="2">Chuyển khoản nhanh (Internet banking, SMS banking, ATM Transfering)</span>
					</div>
					<div class="panel_checkout_content">
						<table>
							<tbody>
								<tr>
									<td class="left_table">Chọn ngân hàng bạn mong muốn</td>
									<td class="right_table">
										<select name="id_bankwire">
										
											{foreach from=$listAccount item=value}
												<option value="{$value.id}">{$value.name_bank}</option>
											{/foreach}
										</select>
									</td>
								</tr>
								<tr>
									<td style="text-align: right;vertical-align: text-top;">
										<img src="{$base_dir}img/alert_transfer.png" alt="" style="margin-top:14px">
									</td>
									<td>
										<ul class="info_details">
											{foreach from=$listAccount item=value}
												<li class="info_{$value.id}">
												<p class="alert_transfer">
														Bạn vui lòng chuyển tiền vào : <br>
														Tài khoản : {$value.number_bank} <br>
														Tên : {$value.name}<br>
														Ngân hàng : {$value.name_bank}
												</p>
												</li>
											{/foreach}
											
										</ul>
										
										
										
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!-- END PANEL -->

		
			{* $HOOK_PAYMENT *}
		</div>
	{if $opc}</div>{/if}
{else}
	<p class="warning">{l s='No payment modules have been installed.'}</p>
{/if}

{if !$opc}
<p class="cart_navigation ">
		<input type="hidden" class="hidden" name="step" value="4" />
		<input type="hidden" name="back" value="{$back}" />
		<a href="{$link->getPageLink($back_order_page,true)}?step=2{if $back}&back={$back}{/if}" title="{l s='Previous'}" class="button">&laquo; {l s='Previous'}</a>
		<input type="submit" name="processPayment" value="{l s='Next'} &raquo;" class="exclusive" />
</p>
{else}
	</div>
{/if}
	</form>
<script>
 jQuery(document).ready(function($){
	var id_bank=jQuery("select[name='id_bankwire'] option:selected" ).val()
		jQuery('.info_details li').each(function(){
		  jQuery('.info_details li').hide();
		  jQuery('.info_details li.info_'+id_bank).show();
		})
		$("select[name='id_bankwire']").change(function() {
		   var id_bank=jQuery("select[name='id_bankwire'] option:selected" ).val()
		jQuery('.info_details li').each(function(){
		  jQuery('.info_details li').hide();
		  jQuery('.info_details li.info_'+id_bank).show();
		})
		});
 })
</script>